angular.module("userapp")
.factory('sessionService',['$http', function($http){
	return {
		set:function(key, value){
			return sessionStorage.setItem(key, value);
		},
		get:function(key){
			return sessionStorage.getItem(key);
		},
		destroy:function(key){
			$http.post(base_url + 'index.php/user/destroy_session');
			return sessionStorage.removeItem(key);
		}
	};
}]);